/**
 */
package com.dingpeikeji.quickdeer.core.modules.realsche.entity;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;

import com.dingpeikeji.quickdeer.core.common.persistence.DataEntity;
import com.dingpeikeji.quickdeer.core.modules.orders.entity.TOrders;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.google.common.collect.Lists;

/**
 * 实际班次Entity
 * @author Zhaoy
 * @version 2016-06-12
 */
public class TRealsche extends DataEntity<TRealsche> {
	// 实际班次类型schekind
	public static final String SCHE_KIND_REGULAR = "2"; // 固定班次
	public static final String SCHE_KIND_TEMP = "1"; // 临时班次
	public static final String SCHE_KIND_RENT = "3"; //整车
	public static final String SCHE_KIND_USER = "4"; //定制包车
	
	public static final String SCHE_KIND_CANBERENT = "a"; //可被整车调度，指整车和定制包车
	
	public static final String DISP_ST_NOTPAY = "0"; // 未生效
	public static final String DISP_ST_NOTPATCH = "1"; // 未调度
	public static final String DISP_ST_PATCHED = "2"; //已调度
	
	private static final long serialVersionUID = 1L;
	private String realscheid;		// 主键
	private String scheid;			//rentid
	private String officeid;
	private String companyid;
	private String schename;		//班次名称
	private Date departdate;		// 发车日期
	private String vehiclenum;		// 车辆数
	private String totalseats;		// 座位数
	private String schetype;
	private String schecode;
	private String schekind;
	private String createby;
	private Date createDate;
	private String dispstatus;		//调度状态
	private String modeldesc;		//需求行程描述
	private String typeremarks;			//车型描述
	private String offermount;			//报价
	private TOrders order;
	private List<TRealscheBoard> tRealscheBoardList = Lists.newArrayList();		// 子表列表
	private List<TRealscheOff> tRealscheOffList = Lists.newArrayList();		// 子表列表
	private List<TRealscheVehi> tRealscheVehiList = Lists.newArrayList();		// 子表列表
	
	// 拓展字段
	private String ordertype; // 订单类型
	private String departdateStr; // 发车日期字符串
	private String backDepartdateStr; // 返回日期字符串
	private String boardtime; // 出发时间
	private String leftSeats; // 剩余票数
	private String realboardid;
	private String realoffid;
	private String boardaddr; // 出发站ID
	private String boardaddrName; // 出发点名称
	private String offaddr; // 目的站ID
	private String offaddrName; // 目的站名称
	private Date realboardtime; // 上客点时间
	private Date realofftime; // 下客点时间
	private String gathertime;
	private Integer diffdays;
	private String retailprice; // 
	private String settleprice; //
	private String boardCitycode; // 出发城市
	private String offCitycode; // 目的城市
	private String pic; // 图片地址
	private String contacts; // 订车人姓名
	private String payertel; // 订车人号码
	private String specserv; // 特色服务
	private String stopPoint;
	
	private String drvconfirmed;
	
	private String nowHHmm; // 当前的时分
	
	public TRealsche() {
		super();
	}

	public TRealsche(String id){
		super(id);
	}

	public String getOffermount() {
		return offermount;
	}

	public void setOffermount(String offermount) {
		this.offermount = offermount;
	}

	public String getRealscheid() {
		return realscheid;
	}

	public void setRealscheid(String realscheid) {
		this.realscheid = realscheid;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getDepartdate() {
		return departdate;
	}

	public void setDepartdate(Date departdate) {
		this.departdate = departdate;
	}
	
	public String getVehiclenum() {
		return vehiclenum;
	}

	public void setVehiclenum(String vehiclenum) {
		this.vehiclenum = vehiclenum;
	}
	
	public String getTotalseats() {
		return totalseats;
	}

	public void setTotalseats(String totalseats) {
		this.totalseats = totalseats;
	}
	
	public List<TRealscheBoard> getTRealscheBoardList() {
		return tRealscheBoardList;
	}

	public void setTRealscheBoardList(List<TRealscheBoard> tRealscheBoardList) {
		this.tRealscheBoardList = tRealscheBoardList;
	}
	
	public List<TRealscheBoard> gettRealscheBoardList() {
		return tRealscheBoardList;
	}

	public void settRealscheBoardList(List<TRealscheBoard> tRealscheBoardList) {
		this.tRealscheBoardList = tRealscheBoardList;
	}
	
	public List<TRealscheOff> getTRealscheOffList() {
		return tRealscheOffList;
	}

	public void setTRealscheOffList(List<TRealscheOff> tRealscheOffList) {
		this.tRealscheOffList = tRealscheOffList;
	}
	
	public List<TRealscheOff> gettRealscheOffList() {
		return tRealscheOffList;
	}

	public void settRealscheOffList(List<TRealscheOff> tRealscheOffList) {
		this.tRealscheOffList = tRealscheOffList;
	}
	
	public List<TRealscheVehi> getTRealscheVehiList() {
		return tRealscheVehiList;
	}

	public void setTRealscheVehiList(List<TRealscheVehi> tRealscheVehiList) {
		this.tRealscheVehiList = tRealscheVehiList;
	}
	public List<TRealscheVehi> gettRealscheVehiList() {
		return tRealscheVehiList;
	}

	public void settRealscheVehiList(List<TRealscheVehi> tRealscheVehiList) {
		this.tRealscheVehiList = tRealscheVehiList;
	}

	public String getLeftSeats() {
		return leftSeats;
	}

	public void setLeftSeats(String leftSeats) {
		this.leftSeats = leftSeats;
	}

	public String getBoardaddr() {
		return boardaddr;
	}

	public void setBoardaddr(String boardaddr) {
		this.boardaddr = boardaddr;
	}

	public String getOffaddr() {
		return offaddr;
	}

	public void setOffaddr(String offaddr) {
		this.offaddr = offaddr;
	}

	public String getDepartdateStr() {
		if(this.departdateStr==null && this.departdate!=null){
			SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
			this.departdateStr = sdf.format(this.departdate);
		}
		return this.departdateStr;
	}

	public void setDepartdateStr(String departdateStr) {
		this.departdateStr = departdateStr;
	}

	public String getSchename() {
		return schename;
	}

	public void setSchename(String schename) {
		this.schename = schename;
	}

	public String getSchetype() {
		return schetype;
	}

	public void setSchetype(String schetype) {
		this.schetype = schetype;
	}

	public String getSchecode() {
		return schecode;
	}

	public void setSchecode(String schecode) {
		this.schecode = schecode;
	}

	public String getCreateby() {
		return createby;
	}

	public void setCreateby(String createby) {
		this.createby = createby;
	}

	public Date getCreateDate() {
		return createDate;
	}

	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}

	public String getRetailprice() {
		return retailprice;
	}

	public void setRetailprice(String retailprice) {
		this.retailprice = retailprice;
	}

	public String getSettleprice() {
		return settleprice;
	}

	public void setSettleprice(String settleprice) {
		this.settleprice = settleprice;
	}

	public String getOfficeid() {
		return officeid;
	}

	public void setOfficeid(String officeid) {
		this.officeid = officeid;
	}

	public String getCompanyid() {
		return companyid;
	}

	public void setCompanyid(String companyid) {
		this.companyid = companyid;
	}

	public String getSchekind() {
		return schekind;
	}

	public void setSchekind(String schekind) {
		this.schekind = schekind;
	}

	public String getRealboardid() {
		return realboardid;
	}

	public void setRealboardid(String realboardid) {
		this.realboardid = realboardid;
	}

	public String getRealoffid() {
		return realoffid;
	}

	public void setRealoffid(String realoffid) {
		this.realoffid = realoffid;
	}

	public String getBoardtime() {
		return boardtime;
	}

	public void setBoardtime(String boardtime) {
		this.boardtime = boardtime;
	}

	public String getBoardCitycode() {
		return boardCitycode;
	}

	public void setBoardCitycode(String boardCitycode) {
		this.boardCitycode = boardCitycode;
	}

	public String getOffCitycode() {
		return offCitycode;
	}

	public void setOffCitycode(String offCitycode) {
		this.offCitycode = offCitycode;
	}

	public String getBackDepartdateStr() {
		return backDepartdateStr;
	}

	public void setBackDepartdateStr(String backDepartdateStr) {
		this.backDepartdateStr = backDepartdateStr;
	}

	public String getPic() {
		return pic;
	}

	public void setPic(String pic) {
		this.pic = pic;
	}

	public String getContacts() {
		return contacts;
	}

	public void setContacts(String contacts) {
		this.contacts = contacts;
	}

	public String getPayertel() {
		return payertel;
	}

	public void setPayertel(String payertel) {
		this.payertel = payertel;
	}

	public Date getRealboardtime() {
		return realboardtime;
	}

	public void setRealboardtime(Date realboardtime) {
		this.realboardtime = realboardtime;
	}

	public Date getRealofftime() {
		return realofftime;
	}

	public void setRealofftime(Date realofftime) {
		this.realofftime = realofftime;
	}

	public String getBoardaddrName() {
		return boardaddrName;
	}

	public void setBoardaddrName(String boardaddrName) {
		this.boardaddrName = boardaddrName;
	}

	public String getOffaddrName() {
		return offaddrName;
	}

	public void setOffaddrName(String offaddrName) {
		this.offaddrName = offaddrName;
	}

	public Integer getDiffdays() {
		return diffdays;
	}

	public void setDiffdays(Integer diffdays) {
		this.diffdays = diffdays;
	}

	public String getGathertime() {
		return gathertime;
	}

	public void setGathertime(String gathertime) {
		this.gathertime = gathertime;
	}

	public String getNowHHmm() {
		return this.nowHHmm;
	}

	public void setNowHHmm(String nowHHmm) {
		this.nowHHmm = nowHHmm;
	}

	public String getOrdertype() {
		return ordertype;
	}

	public void setOrdertype(String ordertype) {
		this.ordertype = ordertype;
	}

	public String getSpecserv() {
		return specserv;
	}

	public void setSpecserv(String specserv) {
		this.specserv = specserv;
	}

	public String getStopPoint() {
		return stopPoint;
	}

	public void setStopPoint(String stopPoint) {
		this.stopPoint = stopPoint;
	}

	public String getDispstatus() {
		return dispstatus;
	}

	public void setDispstatus(String dispstatus) {
		this.dispstatus = dispstatus;
	}

	public TOrders getOrder() {
		return order;
	}

	public void setOrder(TOrders order) {
		this.order = order;
	}

	public String getDrvconfirmed() {
		return drvconfirmed;
	}

	public void setDrvconfirmed(String drvconfirmed) {
		this.drvconfirmed = drvconfirmed;
	}

	public String getScheid() {
		return scheid;
	}

	public void setScheid(String scheid) {
		this.scheid = scheid;
	}

	public String getModeldesc() {
		return modeldesc;
	}

	public void setModeldesc(String modeldesc) {
		this.modeldesc = modeldesc;
	}

	public String getTyperemarks() {
		return typeremarks;
	}

	public void setTyperemarks(String typeremarks) {
		this.typeremarks = typeremarks;
	}
	

}
